package day06;

/*
 * Author: JacksonCoder
 * FileName: MapDemoOfHash
 * Version: 1.0.0
 * Date: 2025/4/13
 */

import java.util.HashMap;
import java.util.Map;

public class MapDemoOfHash {

    public static void main(String[] args) {

        String[] words = {"java","python","c++","javascript","Golang","java","C","c++","python"};
        Map<String,Integer> countMap = new HashMap<>();
        for(String word : words){
            countMap.put(word,countMap.getOrDefault(word,0) + 1);
        }

        System.out.println(countMap); //

    }

}
